<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">

        <div class="layui-form-item">
            <label class="layui-form-label">标题名称</label>
            <div class="layui-input-block">
                <input type="text" name="title" class="layui-input" lay-verify="required" placeholder="请输入标题名称" value="{$row.title|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">副标题</label>
            <div class="layui-input-block">
                <input type="text" name="sub_title" class="layui-input" lay-verify="required" placeholder="请输入副标题" value="{$row.sub_title|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">类型</label>
            <div class="layui-input-block">

                <input type="radio" name="ticket_type" value="1" title="门票" {if $row.ticket_type==1}checked{/if} />
                <input type="radio" name="ticket_type" value="2" title="次卡" {if $row.ticket_type==2}checked{/if}/>
                <input type="radio" name="ticket_type" value="3" title="年卡" {if $row.ticket_type==3}checked{/if}/>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">使用次数</label>
            <div class="layui-input-block">
                <input type="text" name="use_count" class="layui-input" lay-verify="required" placeholder="请输入使用次数" value="{$row.use_count|default=0}">
                <p class="tips tips-danger-color">注意：门票/年卡 请填写0，次卡需要填写次数。</p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">提前预订</label>
            <div class="layui-input-block">
                <input type="text" name="min_time" class="layui-input" lay-verify="required" placeholder="请输入小时" value="{$row.min_time|default=0}">
                <p class="tips tips-danger-color">注意：至少需要提前多少小时预定。0 表示不限制,24表示提前一天，48表示提前2天。</p>
            </div>
        </div>


        <div class="layui-form-item">
            <div class="layui-inline">

                <label class="layui-form-label">销售价格</label>
                <div class="layui-input-block">
                    <input type="text" name="price" class="layui-input"  placeholder="请输入销售价格" value="{$row.price|default=''}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">原价格</label>
                <div class="layui-input-block">
                    <input type="text" name="orgin_price" class="layui-input"  placeholder="请输入原价格" value="{$row.orgin_price|default=''}">
                </div>
            </div>
        </div>

            <div class="layui-form-item">
                <label class="layui-form-label">动态价格</label>
                <input type="hidden" name="ticket_id" value="{$row.id}"/>
                <div class="layui-input-block">
                    <p class="tips tips-danger-color">注意：“动态价格”的相关操作，会实时保存，请谨慎操作！</p>
                    <div class="flex">
                        <div>
                            <select name="price_way"  lay-filter="price_way_select">
                                <option selected value="1">按时间段</option>
                                <option value="2">按周循环</option>
                                <option value="3">按单日期</option>
                            </select>
                        </div>
                        <!--  按时间段设置-->
                        <div id="way1" class=" ">
                            <div  class="flex flex-center">
                                <div class="dropdown dynamic_price">
                                    <input type="hidden" name="dynamic_type" value="1"/>
                                    <label></label>
                                </div>
                                <div class="price_way margin-left-10">
                                    <input type="text" placeholder="请选择时间段" autocomplete="off"  class="layui-input" id="dynamic_range_date">
                                </div>
                                <div class="price_num margin-left-10">
                                    <input type="text" name="dynamic_price" class="layui-input"  placeholder="请输入价格" value="">
                                </div>
                                <a class="addDynamicPrice margin-left-10 layui-btn layui-btn-normal layui-btn-sm">新增</a>
                            </div>
                        </div>
                        <!-- 按周设置-->
                        <div id="way2" class=" web-hide">
                            <div  class="flex flex-center">
                                <div class="dropdown dynamic_price">
                                    <input type="hidden" name="dynamic_type" value="2"/>
                                    <label></label>
                                </div>
                                <div class="price_way margin-left-10">

                                    <input type="checkbox" name="week" value="1" title="周一" lay-skin="primary" />
                                    <input type="checkbox" name="week" value="2" title="周二" lay-skin="primary" />
                                    <input type="checkbox" name="week" value="3" title="周三" lay-skin="primary" />
                                    <input type="checkbox" name="week" value="4" title="周四" lay-skin="primary" />
                                    <input type="checkbox" name="week" value="5" title="周五" lay-skin="primary" />
                                    <input type="checkbox" name="week" value="6" title="周六" lay-skin="primary" />
                                    <input type="checkbox" name="week" value="0" title="周日" lay-skin="primary" />
                                </div>
                                <div class="price_num margin-left-10">
                                    <input type="text" name="dynamic_price" class="layui-input"  placeholder="请输入价格" value="">
                                </div>
                                <a class="addDynamicPrice margin-left-10 layui-btn layui-btn-normal layui-btn-sm">新增</a>
                            </div>
                        </div>
                        <div id="way3" class=" web-hide">
                            <!--  按日期设置-->
                            <div class="flex flex-center">
                                <div class="dropdown dynamic_price">
                                    <input type="hidden" name="dynamic_type" value="3"/>
                                    <label></label>
                                </div>
                                <div class=" margin-left-10" style="width: 50%">
                                    <input name="dynamic_days" class="layui-input" value=""  placeholder="请从右侧选择日期"/>
                                </div>
                                <div class=" margin-left-10">
                                    <input type="text" placeholder="请选择日期"  autocomplete="off"  class="layui-input" id="dynamic_day_date">
                                </div>
                                <div class="price_num margin-left-10">
                                    <input type="text" name="dynamic_price" class="layui-input"  placeholder="请输入价格" value="">
                                </div>
                                <a class="addDynamicPrice margin-left-10 layui-btn layui-btn-normal layui-btn-sm">新增</a>
                            </div>
                        </div>
                    </div>
                    <!-- 价格列表-->
                    <div class="price_items">
                        <table  class="layui-table"  id="price_table">
                            <thead>
                            <tr>
                                <th>排序</th>
                                <th>类型</th>
                                <th>价格</th>
                                <th>项目</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>{$dynamic_price.html|default=''}</tbody>
                        </table>
                    </div>
                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">价格日历</label>
                <div class="layui-input-block" id="show_day_price">

                </div>
            </div>

        <div class="layui-form-item">
            <label class="layui-form-label">文案关联</label>
            <div class="layui-input-block">
                <p class="tips tips-danger-color">注意：文案关联的编辑操作，需要点击底部“确认”按钮保存。</p>
                <div class="flex flex-center">
                    <input type="hidden" id="intro_remark" name="remark" value='{$row.remark|raw|default=''}'/>
                    <input type="hidden" id="intro_xm_select_id"/>
                    <input type="hidden" id="intro_xm_select_title"/>
                    <input type="text"  class="layui-input" style="width: 20%" placeholder="例如：使用说明" id="intro_title"/>
                    <div id="intro_xm_select" class=" margin-left-10 layui-input" style="width:70%;padding-left:0px;"></div>

                    <a class="addIntroBtn margin-left-10 layui-btn layui-btn-normal layui-btn-sm">新增</a>
                </div>

                <div class="intro_table">
                    <table  class="layui-table"  id="intro_table">
                        <thead>
                        <tr>
                            <th>排序</th>
                            <th>标题</th>
                            <th>关联内容</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </div>
            </div>
        </div>



        <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">销量</label>
                    <div class="layui-input-block">
                        <input type="text" name="sale_count" class="layui-input"  placeholder="请输入销量" value="{$row.sale_count|default=''}">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">虚拟销量</label>
                    <div class="layui-input-block">
                        <input type="text" name="virtual_sale_count" class="layui-input"  placeholder="请输入虚拟销量" value="{$row.virtual_sale_count|default=''}">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">库存</label>
                    <div class="layui-input-block">
                        <input type="text" name="stock" class="layui-input"  placeholder="请输入库存" value="{$row.stock|default=''}">
                    </div>
                </div>
            </div>

        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="text" name="sort" class="layui-input"  placeholder="请输入排序" value="{$row.sort|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">换票</label>
            <div class="layui-input-block">
                {foreach $getNeedCheckList as $k=>$v}
                <input type="radio" name="need_check" value="{$k}" title="{$v}" {in name="k" value="$row.need_check"}checked=""{/in}>
                {/foreach}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">退票</label>
            <div class="layui-input-block">
                {foreach $getCanRefundList as $k=>$v}
                <input type="radio" name="can_refund" value="{$k}" title="{$v}" {in name="k" value="$row.can_refund"}checked=""{/in}>
                {/foreach}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                {foreach $getStatusList as $k=>$v}
                <input type="radio" name="status" value="{$k}" title="{$v}" {in name="k" value="$row.status"}checked=""{/in}>
                {/foreach}
            </div>
        </div>

        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>